Sub LaunchExcel()
Dim excelWorkbook As Excel.Workbook

'Connect to the Excel workbook and display it
Set excelWorkbook = GetObject("C:\APP Example _ Files\BookSalesRank.xls")
excelWorkbook.Application.Visible = True
excelWorkbook.Application.Windows("BookSalesRank.xls").Visible = _ True

'Launch the Excel procedure
excelWorkbook.Application.Run "ThisWorkBook.AverageRank"

'Save the modified spreadsheet and close the Automation object
excelWorkbook.Application.ActiveWorkbook.Save
excelWorkbook.Application.Quit
Set excelWorkbook = Nothing

End Sub
